Foxit PDF RDK
FoxitRDKNative.Destination Class Reference

Public Member Functions

 GetBottom ()
 Get bottom position value. More...
 
 GetDestArray ()
 Get the destination PDF array. More...
 
 GetLeft ()
 Get left position value. More...
 
 GetPageIndex (document)
 Get the index of the destination page. More...
 
 GetRight ()
 Get right position value. More...
 
 GetTop ()
 Get top position value. More...
 
 GetZoomFactor ()
 Get zoom factor. More...
 
 GetZoomMode ()
 Get the zoom mode. More...
 
 IsEmpty ()
 Check whether current object is empty or not. More...
 
 IsLeftNull ()
 Check if left value is a null object. More...
 
 IsTopNull ()
 Check if top value is a null object. More...
 

Static Public Member Functions

static CreateFitBBox (document, page_index)
 Create a destination object for zoom mode Destination.e_ZoomFitBBox. More...
 
static CreateFitBHorz (document, page_index, top)
 Create a destination object for zoom mode Destination.e_ZoomFitBHorz. More...
 
static CreateFitBVert (document, page_index, left)
 Create a destination object for zoom mode Destination.e_ZoomFitBVert. More...
 
static CreateFitHorz (document, page_index, top)
 Create a destination object for zoom mode Destination.e_ZoomFitHorz. More...
 
static CreateFitPage (document, page_index)
 Create a destination object for zoom mode Destination.e_ZoomFitPage. More...
 
static CreateFitRect (document, page_index, left, bottom, right, top)
 Create a destination object for zoom mode Destination.e_ZoomFitRect. More...
 
static CreateFitVert (document, page_index, left)
 Create a destination object for zoom mode Destination.e_ZoomFitVert. More...
 
static CreateFromPDFArray (document, opdf_array)
 Create a destination object from an existing destination array. More...
 
static CreateXYZ (document, page_index, left, top, zoom_factor)
 Create a destination object for zoom mode Destination.e_ZoomXYZ. More...
 

Static Public Attributes

static e_ZoomFitBBox
 Fit the bounding box of page entirely within the display area when display the page. More...
 
static e_ZoomFitBHorz
 Fit the entire width of the page's bounding box within the display area when display the page. More...
 
static e_ZoomFitBVert
 Fit the entire height of the page's bounding box within the display area when display the page. More...
 
static e_ZoomFitHorz
 Fit the entire width of the page within the display area when display the page. More...
 
static e_ZoomFitPage
 Fit the entire page within the display area when display the page. More...
 
static e_ZoomFitRect
 Fit the page content in a specified rectangle entirely within the display area when display the page. More...
 
static e_ZoomFitVert
 Fit the entire height of the page within the display area when display the page. More...
 
static e_ZoomXYZ
 Enumeration for zoom mode. More...
 

Detailed Description

A destination defines a particular view of a PDF document, consisting of the following items:

  • The page of the document to be displayed.
  • The location of the document window on that page.
  • The magnification (zoom) factor to use when displaying the page.

Destinations may be associated with bookmarks, or some types of actions. In each case, the destination specifies the view of the document to be presented when the bookmark item or link annotation is opened or the action is performed.
This class offers functions to create destination objects for different zoom modes, and get destination data.

See also
Bookmark
GotoAction
RemoteGotoAction
EmbeddedGotoAction

Member Function Documentation

◆ CreateFitBBox()

static FoxitRDKNative.Destination.CreateFitBBox ( document  ,
page_index   
)
static

Create a destination object for zoom mode Destination.e_ZoomFitBBox.

Parameters
[in]documentA valid PDF document object.
[in]page_indexThe index of the destination page in the PDF document.
Returns
A new destination object.

◆ CreateFitBHorz()

static FoxitRDKNative.Destination.CreateFitBHorz ( document  ,
page_index  ,
top   
)
static

Create a destination object for zoom mode Destination.e_ZoomFitBHorz.

Parameters
[in]documentA valid PDF document object.
[in]page_indexThe index of the destination page in the PDF document.
[in]topThe vertical coordinate of top edge
Returns
A new destination object.

◆ CreateFitBVert()

static FoxitRDKNative.Destination.CreateFitBVert ( document  ,
page_index  ,
left   
)
static

Create a destination object for zoom mode Destination.e_ZoomFitBVert.

Parameters
[in]documentA valid PDF document object.
[in]page_indexThe index of the destination page in the PDF document.
[in]leftHorizontal coordinate of left edge.
Returns
A new destination object.

◆ CreateFitHorz()

static FoxitRDKNative.Destination.CreateFitHorz ( document  ,
page_index  ,
top   
)
static

Create a destination object for zoom mode Destination.e_ZoomFitHorz.

Parameters
[in]documentA valid PDF document object.
[in]page_indexThe index of the destination page in the PDF document.
[in]topVertical coordinate of top edge.
Returns
A new destination object.

◆ CreateFitPage()

static FoxitRDKNative.Destination.CreateFitPage ( document  ,
page_index   
)
static

Create a destination object for zoom mode Destination.e_ZoomFitPage.

Parameters
[in]documentA valid PDF document object.
[in]page_indexThe index of the destination page in the PDF document.
Returns
A new destination object.

◆ CreateFitRect()

static FoxitRDKNative.Destination.CreateFitRect ( document  ,
page_index  ,
left  ,
bottom  ,
right  ,
top   
)
static

Create a destination object for zoom mode Destination.e_ZoomFitRect.

Parameters
[in]documentA valid PDF document object.
[in]page_indexThe index of the destination page in the PDF document.
[in]leftThe coordinate left of a rectangle.
[in]bottomThe coordinate bottom of a rectangle.
[in]rightThe coordinate right of a rectangle.
[in]topThe coordinate top of a rectangle.
Returns
A new destination object.

◆ CreateFitVert()

static FoxitRDKNative.Destination.CreateFitVert ( document  ,
page_index  ,
left   
)
static

Create a destination object for zoom mode Destination.e_ZoomFitVert.

Parameters
[in]documentA valid PDF document object.
[in]page_indexThe index of the destination page in the PDF document.
[in]leftHorizontal coordinate of left edge.
Returns
A new destination object.

◆ CreateFromPDFArray()

static FoxitRDKNative.Destination.CreateFromPDFArray ( document  ,
opdf_array   
)
static

Create a destination object from an existing destination array.

Parameters
[in]documentA valid PDF document object.
[in]pdf_arrayA destination PDF array. This PDF array can be retrieved from a PDFNameTree in type PDFNameTree.e_Dests.
Returns
A new destination object.

◆ CreateXYZ()

static FoxitRDKNative.Destination.CreateXYZ ( document  ,
page_index  ,
left  ,
top  ,
zoom_factor   
)
static

Create a destination object for zoom mode Destination.e_ZoomXYZ.

Parameters
[in]documentA valid PDF document object.
[in]page_indexThe index of the destination page in the PDF document.
[in]leftHorizontal coordinate value of a position as page's left-top position.
[in]topVertical coordinate value of a position as page's left-top position.
[in]zoom_factorZoom factor value.
Returns
A new destination object.

◆ GetBottom()

FoxitRDKNative.Destination.GetBottom ( )

Get bottom position value.

This is only useful when zoom mode is Destination.e_ZoomFitRect. For other zoom modes, this function will be 0.0f.

Returns
The bottom position value.

◆ GetDestArray()

FoxitRDKNative.Destination.GetDestArray ( )

Get the destination PDF array.

Returns
The destination PDF array.If there is any error, this function will return null.

◆ GetLeft()

FoxitRDKNative.Destination.GetLeft ( )

Get left position value.

This is only useful when zoom mode is Destination.e_ZoomXYZ, Destination.e_ZoomFitVert, Destination.e_ZoomFitRect or Destination.e_ZoomFitBVert. Specially for Destination.e_ZoomXYZ, Destination.e_ZoomFitVert and Destination.e_ZoomFitBVert, left value may be a null object, which means that just use current left value of application as the destination's left value. For this case, this function will return 0.0f. In order to check if the left value is just 0 or a null object, user is recommended to call function Destination.IsLeftNull.
For other zoom modes, this function will return 0.0f.

Returns
The left position value.

◆ GetPageIndex()

FoxitRDKNative.Destination.GetPageIndex ( document  )

Get the index of the destination page.

Parameters
[in]documentA valid PDF document object.
Returns
The page index, starting from 0. If there is any error, this function will return -1.

◆ GetRight()

FoxitRDKNative.Destination.GetRight ( )

Get right position value.

This is only useful when zoom mode is Destination.e_ZoomFitRect. For other zoom modes, this function will be 0.0f.

Returns
The right position value.

◆ GetTop()

FoxitRDKNative.Destination.GetTop ( )

Get top position value.

This is only useful when zoom mode is Destination.e_ZoomXYZ, Destination.e_ZoomFitHorz, Destination.e_ZoomFitBHorz or Destination.e_ZoomFitRect. Specially for Destination.e_ZoomXYZ, Destination.e_ZoomFitHorz and Destination.e_ZoomFitBHorz, top value may be a null object, which means that just use current top value of application as the destination's top value. For this case, this function will return 0.0f. In order to check if the left value is just 0 or a null object, user is recommended to call function Destination.IsTopNull.
For other zoom modes, this function will return 0.0f.

Returns
The top position value.

◆ GetZoomFactor()

FoxitRDKNative.Destination.GetZoomFactor ( )

Get zoom factor.

This is only useful when zoom mode is Destination.e_ZoomXYZ. For Destination.e_ZoomXYZ, if the zoom factor is 0, that means just use current zoom factor of application as the destination zoom factor.
For other zoom modes, this function will be 0.0f.

Returns
The zoom factor.

◆ GetZoomMode()

FoxitRDKNative.Destination.GetZoomMode ( )

Get the zoom mode.

Returns
Zoom mode value. Please refer to values starting from Destination.e_ZoomXYZ and this would be one of these values. If no zoom mode or zoom mode is unknown, this function will return 0.

◆ IsEmpty()

FoxitRDKNative.Destination.IsEmpty ( )

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ IsLeftNull()

FoxitRDKNative.Destination.IsLeftNull ( )

Check if left value is a null object.

This is only useful when zoom mode is Destination.e_ZoomXYZ, Destination.e_ZoomFitVert or Destination.e_ZoomFitBVert. This function can be used to check if the left value is a null object. For other zoom modes, this function will return false.

Returns
true means left value is a null object, and false means left value is not a null object and the left value can be retrieved by function Destination.GetLeft.

◆ IsTopNull()

FoxitRDKNative.Destination.IsTopNull ( )

Check if top value is a null object.

This is only useful when zoom mode is Destination.e_ZoomXYZ, Destination.e_ZoomFitHorz, or Destination.e_ZoomFitBHorz. This function can be used to check if the top value is a null object. For other zoom modes, this function will return false.

Returns
true means top value is a null object, and false means top value is not a null object and the top value can be retrieved by function Destination.GetTop.

Member Data Documentation

◆ e_ZoomFitBBox

FoxitRDKNative.Destination.e_ZoomFitBBox
static

Fit the bounding box of page entirely within the display area when display the page.

If this is used, that means the contents of the page should be magnified just enough to fit its bounding box entirely within the display area both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the bounding box within the display area in the other dimension.

◆ e_ZoomFitBHorz

FoxitRDKNative.Destination.e_ZoomFitBHorz
static

Fit the entire width of the page's bounding box within the display area when display the page.

If this is used, that means the contents of the page should be magnified just enough to fit the entire width of the page's bounding box within the display area.

◆ e_ZoomFitBVert

FoxitRDKNative.Destination.e_ZoomFitBVert
static

Fit the entire height of the page's bounding box within the display area when display the page.

If this is used, that means the contents of the page should be magnified just enough to fit the entire height of the page's bounding box within the display area.

◆ e_ZoomFitHorz

FoxitRDKNative.Destination.e_ZoomFitHorz
static

Fit the entire width of the page within the display area when display the page.

If this is used, that means the contents of the page should be magnified just enough to fit the entire width of the page within the display area.

◆ e_ZoomFitPage

FoxitRDKNative.Destination.e_ZoomFitPage
static

Fit the entire page within the display area when display the page.

If this is used, that means the contents of the page should be magnified just enough to fit the entire page within the display area both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the page within the window in the other dimension.

◆ e_ZoomFitRect

FoxitRDKNative.Destination.e_ZoomFitRect
static

Fit the page content in a specified rectangle entirely within the display area when display the page.

If this is used, that means the contents of the page should be magnified just enough to fit the page content in the specified rectangle entirely within the display area both horizontally and vertically. If the required horizontal and vertical magnification factors are different, use the smaller of the two, centering the rectangle within the display area in the other dimension.

◆ e_ZoomFitVert

FoxitRDKNative.Destination.e_ZoomFitVert
static

Fit the entire height of the page within the display area when display the page.

If this is used, that means the contents of the page should be magnified just enough to fit the entire height of the page within the display area.

◆ e_ZoomXYZ

FoxitRDKNative.Destination.e_ZoomXYZ
static

Enumeration for zoom mode.

Values of this enumeration should be used alone.

Display page with a specified position and a specified zoom factor. If this is used, that means the specified position of the page will be treated as the left-top position when the page is rendered and this position should be at the upper-left corner of the display area. Contents of the page should be magnified by the specified zoom factor.